#!/usr/local/bin/python3
#-*- coding:utf8 -*-
# Author Aaron 
# 2017-06-05 10:32:53
import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
input1 = 17
input2 = 27
ena = 22
GPIO.setup(ena,GPIO.OUT,initial=GPIO.LOW)
GPIO.setup(input1,GPIO.OUT,initial=GPIO.LOW)
GPIO.setup(input2,GPIO.OUT,initial=GPIO.LOW)


GPIO.output(input1,GPIO.LOW)
GPIO.output(input2,GPIO.HIGH)
pwm = GPIO.PWM(ena,50)  #频率......必须设置频率配合 占空比
pwm.start(1)
pwm.ChangeDutyCycle(80)
time.sleep(100000)


GPIO.cleanup()




